import request from '/@/utils/request';

export function getPage(query?: Object) {
	return request({
		url: '/bizs/prodCategory/page',
		method: 'get',
		params: query,
	});
}

export function getList(query?: Object) {
	return request({
		url: '/bizs/prodCategory/list',
		method: 'get',
		params: query,
	});
}

export function getObj(id?: string) {
	return request({
		url: '/bizs/prodCategory/' + id,
		method: 'get',
	});
}

export const getTree = (query?: Object) => {
	return request({
		url: '/bizs/prodCategory/tree',
		method: 'get',
		params: query,
	});
};

export const getProdCateListAPI = () => {
	return request({
		url: '/bizs/prodCategory/list',
		method: 'GET',
	});
};

export function addObj(obj?: Object) {
	return request({
		url: '/bizs/prodCategory',
		method: 'post',
		data: obj,
	});
}

export function delObjs(ids?: string[]) {
	return request({
		url: '/bizs/prodCategory',
		method: 'delete',
		data: ids,
	});
}

export function putObj(obj?: Object) {
	return request({
		url: '/bizs/prodCategory',
		method: 'put',
		data: obj,
	});
}
